﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Problem9
{
    class Program
    {
        static void Main(string[] args)
        {
            int result = 0;
            
            for (int a = 0; a < 1000; a++)
            {
                for (int b = a + 1; b < 1000; b++)
                {
                    double c = Math.Sqrt(a * a + b * b);

                    if (a + b + c == 1000.0)
                    {
                        result = a * b * (int)c;
                    }
                }
            }

            Console.WriteLine(result);
            Console.ReadKey();
        }
    }
}
